﻿using CanDoo.Admin.Core.Contracts;
using CanDoo.Admin.Core.Models;
using CanDoo.Core.Data;
using Microsoft.AspNet.Identity;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CanDoo.Admin.Core.Identity
{
    public class RoleManager : RoleManager<Role, long>, IQueryableRoleStore<Role, long>, CanDoo.Core.Dependency.IScopeDependency
    {
        public RoleManager(IRoleStore<Role, long> store) : base(store)
        {
        }

        Task IRoleStore<Role, long>.CreateAsync(Role role)
        {
            return Store.CreateAsync(role);
        }

        Task IRoleStore<Role, long>.DeleteAsync(Role role)
        {
            return Store.DeleteAsync(role);
        }

        Task IRoleStore<Role, long>.UpdateAsync(Role role)
        {
            return Store.UpdateAsync(role);
        }
    }
}
